# -*- coding=utf-8
from qcloud_cos import CosConfig
from qcloud_cos import CosS3Client
import sys
import logging

logging.basicConfig(level=logging.INFO, stream=sys.stdout)
secret_id = 'AKID1ppa2D2jeOsRmqOoqc7KsADzCTTC9t2z'  # 替换为用户的 secretId
secret_key = 'pUlmWy99sKdEaeRyGGyFm33meJhplgLi'  # 替换为用户的 secretKey
region = 'ap-guangzhou'  # 替换为用户的 Region

config = CosConfig(Region=region, SecretId=secret_id, SecretKey=secret_key)
# 2. 获取客户端对象
client = CosS3Client(config)
objects = {
                "Quiet": "true",
                "Object": [
                    {
                        "Key": "p1.jpg"
                    },
                    {
                        "Key": "tx.jpg"
                    }
                ]
            }
client.delete_objects(
    Bucket='miaojiaxi-1304867879',
    Delete=objects
)

